Crate alsa

source ·
Expand description

Thin but safe wrappers for ALSA.

GitHub repo

Crates.io

This ALSA API wrapper/binding is WIP - the ALSA API is huge, and new functions and structs might be added as requested.

Most functions map 1-to-1 to alsa-lib functions, e g, ctl::CardInfo::get_id() is a wrapper around snd_ctl_card_info_get_id and the alsa-lib documentation can be consulted for additional information.

Enjoy!

Re-exports§

  • pub use crate::card::Card;
  • pub use crate::ctl::Ctl;
  • pub use crate::hctl::HCtl;
  • pub use crate::pcm::PCM;
  • pub use crate::rawmidi::Rawmidi;
  • pub use crate::poll::Descriptors as PollDescriptors;
  • pub use crate::mixer::Mixer;
  • pub use crate::seq::Seq;

Modules§

  • Sound card enumeration
  • Control device API
  • Enumerate devices in the alsa library configuration
  • Functions that bypass alsa-lib and talk directly to the kernel.
  • HCtl API - for mixer control and jack detection
  • Mixer API - Simple Mixer API for mixer control
  • Audio playback and capture
  • Tiny poll ffi
  • MIDI devices I/O and enumeration
  • MIDI sequencer I/O and enumeration

Structs§

Enums§

  • Replaces constants ending with PLAYBACK/CAPTURE as well as INPUT/OUTPUT
  • Rounding mode (used in some mixer related calls)
  • Used to restrict hw parameters. In case the submitted value is unavailable, in which direction should one search for available values?

Type Aliases§